<template>
  <footer class="footer">
    <div class="footer-main">
      <div class="page-container">
        <div class="footer-columns">
          <div class="footer-column">
            <h3>关于易凡</h3>
            <ul class="footer-links">
              <li><router-link to="/about">公司简介</router-link></li>
              <li><router-link to="/about/history">发展历程</router-link></li>
              <li><router-link to="/about/team">管理团队</router-link></li>
              <li><router-link to="/about/organization">组织架构</router-link></li>
              <li><router-link to="/about/honors">企业荣誉</router-link></li>
            </ul>
          </div>
          
          <div class="footer-column">
            <h3>主营业务</h3>
            <ul class="footer-links">
              <li><router-link to="/boxs">业务概览</router-link></li>
              <li><router-link to="/boxs/software">软件开发</router-link></li>
              <li><router-link to="/boxs/integration">系统集成</router-link></li>
              <li><router-link to="/boxs/consulting">技术咨询</router-link></li>
              <li><router-link to="/boxs/projects">典型项目</router-link></li>
            </ul>
          </div>
          
          <div class="footer-column">
            <h3>企业动态</h3>
            <ul class="footer-links">
              <li><router-link to="/news">新闻资讯</router-link></li>
              <li><router-link to="/news/media">媒体报道</router-link></li>
              <li><router-link to="/news/video">视频中心</router-link></li>
              <li><router-link to="/product/social">社会责任</router-link></li>
            </ul>
          </div>
          
          <div class="footer-column">
            <h3>人才招聘</h3>
            <ul class="footer-links">
              <li><router-link to="/recruits">招聘岗位</router-link></li>
              <li><router-link to="/recruits/campus">校园招聘</router-link></li>
              <li><router-link to="/recruits/social">社会招聘</router-link></li>
              <li><router-link to="/recruits/intern">实习生招聘</router-link></li>
            </ul>
          </div>
          
          <div class="footer-column contact-column">
            <h3>联系我们</h3>
            <ul class="contact-info">
              <li><i class="el-icon-location"></i> 甘肃省兰州市皋兰县海河街6号</li>
              <li><i class="el-icon-phone"></i> 087-32544554-322</li>
              <li><i class="el-icon-document"></i> 传真：097-245256549243</li>
              <li><i class="el-icon-message"></i> contact@yifan-tech.com</li>
              <li><i class="el-icon-time"></i> 工作时间：周一至周五 9:00-18:00</li>
            </ul>
            <div class="qrcode-container">
              <div class="qrcode">
                <img src="@/assets/logo.png" alt="微信公众号" class="qrcode-img">
                <p>关注微信公众号</p>
              </div>
            </div>
          </div>
        </div>
        
        <div class="footer-bottom-section">
          <div class="footer-bottom-info">
            <div class="footer-logo">
              <img src="@/assets/logo.png" alt="易凡科技" class="logo-img">
              <div class="company-info">
                <h2>易凡科技</h2>
                <p>专注于软件开发和信息技术服务的高科技企业</p>
              </div>
            </div>
            
            <div class="stock-info">
              <p class="stock-title">证券信息</p>
              <div class="stock-grid">
                <div class="stock-item">
                  <span class="stock-code">股票代码：600123</span>
                  <span class="stock-price">20.36 <i class="el-icon-top" style="color:#ff4d4f"></i> +0.42</span>
                  <span class="stock-time">截止时间：{{ currentTime }}</span>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    <div class="footer-bottom">
      <div class="page-container">
        <div class="copyright">
          <p>© {{ currentYear }} 易凡科技（中国）有限公司 版权所有</p>
          <p>甘ICP备<span>62000002000103</span>号 | 甘公网安备 <span>62010502000532</span>号</p>
        </div>
        <div class="footer-nav">
          <router-link to="/legal/privacy">隐私政策</router-link>
          <router-link to="/legal/terms">服务条款</router-link>
          <router-link to="/sitemap">网站地图</router-link>
          <router-link to="/touch">联系我们</router-link>
        </div>
      </div>
    </div>
  </footer>
</template>

<script>
import { ref, computed, onMounted } from 'vue';

export default {
  name: 'AppFooter',
  setup() {
    const currentYear = computed(() => {
      return new Date().getFullYear();
    });
    
    const currentTime = ref('');
    
    const updateCurrentTime = () => {
      const now = new Date();
      const year = now.getFullYear();
      const month = String(now.getMonth() + 1).padStart(2, '0');
      const day = String(now.getDate()).padStart(2, '0');
      const hours = String(now.getHours()).padStart(2, '0');
      const minutes = String(now.getMinutes()).padStart(2, '0');
      
      currentTime.value = `${year}-${month}-${day} ${hours}:${minutes}`;
    };
    
    onMounted(() => {
      updateCurrentTime();
      // 更新时间，每分钟更新一次
      setInterval(updateCurrentTime, 60000);
    });
    
    return {
      currentYear,
      currentTime
    };
  }
}
</script>

<style lang="scss" scoped>
.footer {
  background-color: #f5f5f5;
  color: #333;
  
  .footer-main {
    padding: 60px 0 30px;
    
    .footer-columns {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 30px;
      margin-bottom: 40px;
      
      @media (max-width: 1200px) {
        grid-template-columns: repeat(3, 1fr);
      }
      
      @media (max-width: 768px) {
        grid-template-columns: repeat(2, 1fr);
      }
      
      @media (max-width: 576px) {
        grid-template-columns: 1fr;
      }
    }
    
    .footer-column {
      h3 {
        font-size: 18px;
        color: #163C7D;
        margin-bottom: 20px;
        font-weight: 500;
        position: relative;
        padding-bottom: 12px;
        
        &::after {
          content: '';
          position: absolute;
          left: 0;
          bottom: 0;
          width: 40px;
          height: 2px;
          background-color: #163C7D;
        }
      }
      
      .footer-links {
        list-style: none;
        padding: 0;
        margin: 0;
        
        li {
          margin-bottom: 12px;
          
          a {
            color: #666;
            text-decoration: none;
            font-size: 14px;
            transition: all 0.3s;
            position: relative;
            padding-left: 15px;
            
            &::before {
              content: '';
              position: absolute;
              left: 0;
              top: 8px;
              width: 5px;
              height: 5px;
              border-radius: 50%;
              background-color: #ccc;
            }
            
            &:hover {
              color: #163C7D;
              padding-left: 18px;
              
              &::before {
                background-color: #163C7D;
              }
            }
          }
        }
      }
      
      &.contact-column {
        @media (max-width: 1200px) {
          grid-column: span 3;
        }
        
        @media (max-width: 768px) {
          grid-column: span 2;
        }
        
        @media (max-width: 576px) {
          grid-column: span 1;
        }
        
        .contact-info {
          list-style: none;
          padding: 0;
          margin: 0;
          
          li {
            margin-bottom: 12px;
            display: flex;
            align-items: flex-start;
            color: #666;
            font-size: 14px;
            
            i {
              color: #163C7D;
              margin-right: 10px;
              font-size: 16px;
              margin-top: 2px;
            }
          }
        }
        
        .qrcode-container {
          margin-top: 20px;
          display: flex;
          align-items: center;
          
          .qrcode {
            text-align: center;
            
            .qrcode-img {
              width: 100px;
              height: 100px;
              padding: 5px;
              border: 1px solid #e0e0e0;
              background-color: #fff;
            }
            
            p {
              margin: 8px 0 0;
              font-size: 13px;
              color: #666;
            }
          }
        }
      }
    }
    
    .footer-bottom-section {
      padding-top: 30px;
      border-top: 1px solid #e0e0e0;
      
      .footer-bottom-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        
        @media (max-width: 992px) {
          flex-direction: column;
          gap: 30px;
          align-items: flex-start;
        }
        
        .footer-logo {
          display: flex;
          align-items: center;
          
          .logo-img {
            width: 60px;
            height: 60px;
            margin-right: 15px;
          }
          
          .company-info {
            h2 {
              font-size: 20px;
              color: #163C7D;
              margin: 0 0 5px;
            }
            
            p {
              font-size: 14px;
              color: #666;
              margin: 0;
            }
          }
        }
        
        .stock-info {
          .stock-title {
            font-size: 16px;
            color: #163C7D;
            margin-bottom: 10px;
            font-weight: 500;
          }
          
          .stock-grid {
            display: grid;
            grid-template-columns: repeat(1, 1fr);
            gap: 15px;
            
            .stock-item {
              background-color: #fff;
              padding: 15px;
              border-radius: 4px;
              box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
              display: flex;
              flex-direction: column;
              
              .stock-code {
                font-size: 14px;
                color: #666;
                margin-bottom: 8px;
              }
              
              .stock-price {
                font-size: 18px;
                font-weight: 600;
                color: #333;
                margin-bottom: 5px;
                
                i {
                  font-size: 14px;
                  margin-left: 5px;
                }
              }
              
              .stock-time {
                font-size: 12px;
                color: #999;
              }
            }
          }
        }
      }
    }
  }
  
  .footer-bottom {
    background-color: #163C7D;
    color: #fff;
    padding: 20px 0;
    
    .page-container {
      display: flex;
      justify-content: space-between;
      align-items: center;
      
      @media (max-width: 768px) {
        flex-direction: column;
        gap: 15px;
      }
    }
    
    .copyright {
      p {
        margin: 0;
        font-size: 14px;
        opacity: 0.8;
        
        &:first-child {
          margin-bottom: 5px;
        }
        
        span {
          color: #ff9800;
        }
      }
    }
    
    .footer-nav {
      display: flex;
      gap: 20px;
      
      a {
        color: #fff;
        opacity: 0.8;
        text-decoration: none;
        font-size: 14px;
        
        &:hover {
          opacity: 1;
          text-decoration: underline;
        }
      }
    }
  }
}
</style> 